<template>
  <div class="hot-work">
    <div v-if="songs.length > 0">
      <header-actions
          :songs="songs"
          :isShare="false"
          :isDownload="false"
          :isReview="false"
      />
      <music-list
          :paginationPlaylist="songs"
          :isHeader="false"
          :noShowPage="false"
          :isSong="false"
          :isMusic="false"
      />
    </div>
    <loading v-else site=".app"/>
  </div>
</template>

<script setup>
import {useStore} from "@/store/index";
import {useRoute} from "vue-router";
import {reactive, toRefs} from "vue";
import HeaderActions from '@/components/HeaderActions/index.vue'
import MusicList from '@/components/MusicList/index.vue'

const data = reactive({
  songs: []
})
const { songs } = toRefs(data)
const route = useRoute()
const store = useStore()

// 设置tab下标
store.songTabIndex = 0
// 设置点击播放全部的type
store.currentInfo.type = 4

store.getArtistTopSong(route.query.id).then(songs => {
  data.songs = songs
  // console.log(data.songs)
})
</script>

<style scoped>

</style>
